import React, {Component} from 'react';
import PropTypes from "prop-types";

class Navbar extends Component {

    static propTypes = {
        showLeft: PropTypes.bool.isRequired,
        title: PropTypes.string.isRequired
    }

    render() {
        return (
            <div>
                {this.props.showLeft && <button>返回</button>}Navbar---{this.props.title}
            </div>
        );
    }
}

export default Navbar;